package com.huawei.hwCloudJs.support.a;

import android.content.Context;
import android.util.Log;
import com.huawei.hwCloudJs.support.a.a.a;
import com.huawei.hwCloudJs.support.a.a.b;

public class c {
    private static final String a = "CacheRequestManager";

    public static void a(final String[] strArr, final int i, final Context context) {
        Log.i(a, "enter into preload");
        new Thread(new Runnable() {
            public void run() {
                for (String str : strArr) {
                    if (b.a().c(str) == null) {
                        b bVar = (b) com.huawei.hwCloudJs.service.http.b.a(new a(str), context);
                        if (bVar.f() == 1) {
                            b.a().a(str, new a(str, bVar.a(), bVar.a().length(), i));
                        } else {
                            Log.e(c.a, "getcache url failed!");
                        }
                    }
                }
            }
        }).start();
    }
}
